It is common to compress data, filter data, recognize patterns in data, and perform other similar functions with data. Often, such functions involve matching source data with a predefined set of data units. The data units may comprise symbols, color tiles, sounds, or other predefined units of data. The data units can be used to represent the source data in a compressed form, or used to perform functions that involve comparing the data units to the source data. For example, it is common to reduce the amount of data needed to represent a source image by comparing a set of predefined pixel maps (of limited number) to cells of the source image and selecting the closest matching pixel map to represent each cell.
The typical approach for comparing the set of pixel maps to the cells of a decomposed source image involves the time consuming process of comparing every pixel map to each target cell in turn. The pixel map that most closely matches a source image cell is selected to represent that source image cell. However, the speed of such an approach is limited by the need for O(x×y) comparisons, where x is the number of pixel maps in the set, and y is the number of cells in the source image. Specifically, in the conventional approach, each pixel map in the set is compared to the first cell in the source image, the best matching pixel map for the first cell is selected, each pixel map in the set is then compared to the second cell in the source image, and the best matching pixel map for the second cell is again selected. This process must be repeated for every cell in the source image. Clearly, it would be desirable to increase the speed at which such comparisons can be accomplished.